package com.ncloud.resman.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.ncloud.resman.conf.CustomJsonDateDeserializer;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by shiqiang on 2017/8/11.
 */
public class DeviceServer implements Serializable {
    @JSONField(serializeUsing=ToStringSerializer.class)
    private Long deviceId;
    private String purpose;
    private String manageIp;
    private String ipmiAddr;
    private String sysModel;
    private String serviceCode;
    private String hostName;
    @JSONField(serializeUsing=ToStringSerializer.class)
    private Long createUser;
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    @JSONField(serializeUsing=ToStringSerializer.class)
    private Long updateUser;
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date updateDate;
    private DeviceBase deviceBase;

    public DeviceBase getDeviceBase() {
        return deviceBase;
    }

    public void setDeviceBase(DeviceBase deviceBase) {
        this.deviceBase = deviceBase;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public String getManageIp() {
        return manageIp;
    }

    public void setManageIp(String manageIp) {
        this.manageIp = manageIp;
    }

    public String getIpmiAddr() {
        return ipmiAddr;
    }

    public void setIpmiAddr(String ipmiAddr) {
        this.ipmiAddr = ipmiAddr;
    }

    public String getSysModel() {
        return sysModel;
    }

    public void setSysModel(String sysModel) {
        this.sysModel = sysModel;
    }

    public String getServiceCode() {
        return serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    public String getHostName() {
        return hostName;
    }

    public void setHostName(String hostName) {
        this.hostName = hostName;
    }

    public Long getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Long createUser) {
        this.createUser = createUser;
    }

    public Date getCreateDate() {
        return createDate;
    }
    @JsonDeserialize(using = CustomJsonDateDeserializer.class)
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Long updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdateDate() {
        return updateDate;
    }
    @JsonDeserialize(using = CustomJsonDateDeserializer.class)
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}
